package com.jiyici;

import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;

import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.app.SherlockFragmentActivity;

public class GlobalTheme {

//    public static final int THEME = com.actionbarsherlock.R.style.Theme_Sherlock_Light_DarkActionBar;// .Theme_Sherlock_Light;
//    public static final int THEME = com.actionbarsherlock.R.style.Theme_Sherlock;
    public static final int THEME = com.jiyici.R.style.AppTheme;
    public static final int ACTIONBAR_BG_COLOR = Color.parseColor("#ff00857c");

    public static void applyTheme(SherlockActivity activity, boolean showTitle) {
        activity.setTheme(THEME);
        activity.getSupportActionBar().setBackgroundDrawable(new ColorDrawable(ACTIONBAR_BG_COLOR));
        activity.getSupportActionBar().setDisplayShowTitleEnabled(showTitle);
    }

    public static void applyTheme(SherlockFragmentActivity activity, boolean showTitle) {
        activity.setTheme(THEME);
        activity.getSupportActionBar().setBackgroundDrawable(new ColorDrawable(ACTIONBAR_BG_COLOR));
        activity.getSupportActionBar().setDisplayShowTitleEnabled(showTitle);
    }

}
